package cate.game.role.bag.awakenfairy;

import cate.common.table.d.GDObj;
import cate.common.table.item.awakenfairy.row.AwakenFairyBaseRow;
import cate.game.GameBody;
import cate.game.play.support.PlayBuildContext;
import cate.game.role.Role;
import cate.game.role.bag.item.BaseBagItem;
import cp.solution.pattern.ICopiable;

public class AwakenFairy extends BaseBagItem implements ICopiable<AwakenFairy> {
    public AwakenFairy(){}

    public AwakenFairy(Role role, int tid, long num){
        super(role, GDObj.Type.AWAKEN_FAIRY, tid, num);
        initialize(role);
    }

    @Override
    public AwakenFairyBaseRow getTpl(PlayBuildContext ctx) {
        return ctx.awakenFairyExcel().base.get(tid);
    }

    @Override
    public AwakenFairyBaseRow getTpl(GameBody game) {
        return game.table.awakenFairy.base.get(tid);
    }

    @Override
    public AwakenFairy copy() {
        AwakenFairy cp = new AwakenFairy();
        super.copy(cp);
        return cp;
    }
}
